package com.zy.je.common.mybatis.ext.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zy.je.common.core.model.ResultMap;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.HashMap;
import java.util.Map;

/**
 * 查询条件增强对象
 *
 * @author zy
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public class ResultEnhance implements  ResultMap {
    /**
     * 扩展的返回结果--用于保存字段的翻译
     */
    @ApiParam(hidden = true)
    @TableField(exist = false)
    protected Map<String, Object> _r;

    @Override
    public Map<String, Object> buildR() {
        if (null == this._r) {
            this._r = new HashMap<>();
        }
        return this._r;
    }

}
